import { Column, Entity } from 'typeorm';
import { DBColumns } from '../';
import { NoticeSchema } from '../../schema';

@Entity('notice')
export class Notice extends DBColumns implements NoticeSchema {
  @Column({
    type: 'varchar',
    length: 50,
    nullable: false,
    default: null,
    comment: '通知/公告标题',
  })
  title: string;

  @Column({
    type: 'text',
    nullable: false,
    default: null,
    comment: '通知/公告内容',
  })
  context: string;

  @Column({
    type: 'bool',
    nullable: false,
    default: false,
    comment: '通知/公告是否关闭',
  })
  isOff: string;
}
